package com.itwn.email.consumer.d_direct;

import com.itwn.email.producer.d_direct.DirectConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class DirectConsumer2 {

    /**
     * 监听队列：fanout.queue1中的消息
     * @param msg
     */
    @RabbitListener(queues = DirectConfig.DIRECT_QUEUE2)
    public void getMessage(String msg ){
        System.out.println("DirectConsumer2 收到消息："+msg);
    }
}
